Skip to content

feat(changelogs): Use SBOMs for standardized package data extraction - #4635

Merged
castrojo merged 1 commit into
ublue-os:mainfrom
dylanmtaylor:sbom-changelogs
May 22, 2026
Merged

feat(changelogs): Use SBOMs for standardized package data extraction#4635
castrojo merged 1 commit into
ublue-os:mainfrom
dylanmtaylor:sbom-changelogs

Conversation

@dylanmtaylor

Copy link
Copy Markdown
Contributor

Refactors the changelog generation script to fetch package information from image Software Bill of Materials (SBOMs) instead of custom labels.

This is split out of #4564 to derisk the change

Copilot AI review requested due to automatic review settings May 16, 2026 01:59
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. area/just Justfile things kind/automation Automation tasks and workflows labels May 16, 2026
@codacy-production

codacy-production Bot commented May 16, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 medium

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
Complexity 1 medium

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the release changelog generator to derive package/version changes from container image SBOMs stored as OCI referrers, instead of relying on custom image labels.

Changes:

  • Update .github/changelogs.py to fetch image digests with skopeo, discover/pull SBOMs via oras, and parse RPM package data from the SBOM.
  • Adjust the release workflow to install ORAS and scope default workflow permissions to empty (job-level contents: write).
  • Add a gen-sbom utility recipe and ignore its local output directory (sbom_out/).

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Justfile Adds a gen-sbom utility recipe to export an image rootfs and generate a Syft SBOM.
.gitignore Ignores sbom_out/ artifacts produced by local SBOM generation.
.github/workflows/generate-release.yml Installs ORAS for SBOM retrieval and tightens default permissions.
.github/renovate.json5 Removes the legacy rechunk image from a non-automerge rule.
.github/changelogs.py Switches package extraction to SBOM referrers discovered/pulled with ORAS.
Comments suppressed due to low confidence (1)

.github/workflows/generate-release.yml:56

  • changelogs.py now uses oras discover/pull against GHCR, but this workflow only installs ORAS and does not authenticate to ghcr.io. This can fail in practice (e.g., SBOM referrers access requiring auth / rate limits). Add an oras login ghcr.io step (using GITHUB_TOKEN) and ensure the job has packages: read permission if needed.
      - name: Install ORAS
        uses: oras-project/setup-oras@38de303aac69abb66f3e6255b7198bff35f323e3 # v2.0.0

      - name: Generate Release Text
        id: generate-release-text
        shell: bash
        run: |
          just changelogs "${{ matrix.version }}" "${{ inputs.handwritten }}"
          source ./output.env

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/changelogs.py
@dylanmtaylor

Copy link
Copy Markdown
Contributor Author

@renner0e renner0e left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are introducing the justfile recipe here for generating the SBOMs, but not using it

Refactors the changelog generation script to fetch package information
from image Software Bill of Materials (SBOMs) instead of custom labels.

This is split out of ublue-os#4564 to derisk the change
@dylanmtaylor

Copy link
Copy Markdown
Contributor Author

you are introducing the justfile recipe here for generating the SBOMs, but not using it

Ah, good catch. I saw the new SBOM flow was working via the changelog script, but I've updated it in the reusable build too

@dylanmtaylor

Copy link
Copy Markdown
Contributor Author

https://github.com/dylanmtaylor/bluefin/actions/runs/25951141071/job/76289092973 worked correctly and exercised the SBOM logic - tested there since PRs don't try it.

@dylanmtaylor
dylanmtaylor requested a review from renner0e May 16, 2026 15:21

@renner0e renner0e left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not tested this in any capacity but the approach chosen here has worked for aurora...

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 22, 2026
@castrojo
castrojo enabled auto-merge May 22, 2026 02:38
@castrojo
castrojo added this pull request to the merge queue May 22, 2026
Merged via the queue into ublue-os:main with commit b6a0f5c May 22, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/just Justfile things kind/automation Automation tasks and workflows lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants